package Assignment1;

public class Province {
    private String name;        // 省份
    private String Capital;     // 首府
    private int ranking;        // 全国GDP排名
    private int num;           // 城市数（地级市数）
    public Province(String name,String capital,int ranking,int num){
        this.name=name;
        this.Capital=capital;
        this.ranking=ranking;
        this.num=num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCapital() {
        return Capital;
    }

    public void setCapital(String capital) {
        Capital = capital;
    }

    public int getRanking() {
        return ranking;
    }

    public void setRanking(int ranking) {
        this.ranking = ranking;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void getprint(){
        System.out.println("省份："+name+" 首府："+Capital+" GDP排名："+ranking+" 地级市数："+num);
    }


}

